#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <assert.h>

int my_strcmp(const char* dest, const char* src)
{
	assert(dest && src);

	while (*dest == *src)
	{
		if (*dest == '\0')
		{
			return 0;
		}
		dest++;
		src++;
	}
	//if (*dest > *src)
	//{
	//	return 1;
	//}
	//else
	//{
	//	return -1;
	//}

	return *dest - *src;
}

int main()
{
	char arr1[] = "abcdef";
	char arr2[] = "abkdef";

	int ret = my_strcmp(arr1, arr2);
	printf("%d\n", ret);
	if (ret > 0)
	{
		printf("arr1>arr2\n");
	}
	else if (ret == 0)
	{
		printf("arr1 = arr2\n");
	}
	else
	{
		printf("arr1<arr2\n");
	}

	return 0;
}